package com.gxa.ehome.exception;


import com.gxa.ehome.busiCodeEnum.ErrorCode;

// 自定义一个异常,表示程序中出现的业务类型的异常(登录失败)
public class BusinessException extends RuntimeException {

        private ErrorCode errorCode;

        public ErrorCode getErrorCode() {
            return errorCode;
        }

        public void setErrorCode(ErrorCode errorCode) {
            this.errorCode = errorCode;
        }

    public BusinessException(ErrorCode errorCode){
            super(errorCode.toString());
            this.errorCode = errorCode;
        //super(errorCode.getDesc());
    }
}
